//
//  YCFunctionView.h
//  DemoFunctionView
//
//  Created by 唐可雄 on 16/6/21.
//  Copyright © 2016年 swustyc. All rights reserved.
//

#import <UIKit/UIKit.h>

@class YCFunctionView;

#pragma mark - YCFunctionViewCell

/**
 *  the cell in Function View
 */
@interface YCFunctionViewCell : UICollectionViewCell

@property (strong, nonatomic) UIImageView *imgView;
@property (strong, nonatomic) UILabel *titleLabel;
@property (strong, nonatomic) UILabel *badgeLabel;

@end

#pragma mark - YCFunctionViewLayeout

/**
 *  the layout for collection
 */
@interface YCFunctionViewLayout : UICollectionViewLayout

@end

#pragma mark - YCFunctionViewDataSource

/**
 *  the datasource protocol of Function View
 */
@protocol YCFunctionViewDataSource <NSObject>

@required
- (NSInteger)numberOfCellsInFunctionView:(YCFunctionView *)functionView;
- (void)functionView:(YCFunctionView *)functionView configCell:(YCFunctionViewCell *)cell atIndex:(NSInteger)index;
@optional
- (CGSize)sizeOfCellInFunctionView:(YCFunctionView *)functionView;

@end

#pragma mark - YCFunctionViewDelegate

/**
 *  the delegate protocol of Function View
 */
@protocol YCFunctionViewDelegate <NSObject>

@optional
- (void)functionView:(YCFunctionView *)functionView didClickAtIndex:(NSInteger)index;

@end

#pragma mark - YCFunctionView

/**
 *  the class for Function Panel
 */
@interface YCFunctionView : UIView

@property (weak, nonatomic) id<YCFunctionViewDataSource> dataSource;
@property (weak, nonatomic) id<YCFunctionViewDelegate> delegate;

@property (strong, nonatomic) UICollectionView *collectionView;
@property (strong, nonatomic) UIPageControl *pageControl;

@end
